package entities;
import javafx.scene.shape.Rectangle;
import java.awt.*;
import java.awt.geom.Rectangle2D;

public abstract class Entity {
    protected float x, y;
    protected int width,height;
    protected Rectangle2D.Float hitBox;
    public Entity(int x, int y,int width,int height) {
        this.x = x;
        this.y = y;
        this.width=width;
        this.height=height;
    }
    public void initHitBox(float x,float y,float width,float height){
    hitBox=new Rectangle2D.Float(x,y,width,height);
    }
//    protected void updateHitBox(){
//        hitBox.x = (int) x;
//        hitBox.y = (int) y;
//    }
    public Rectangle2D.Float getHitBox(){
        return hitBox;
    }
    protected void drawHitBox(Graphics g){
        g.setColor(Color.pink);
        g.drawRect((int) hitBox.x,(int)hitBox.y,(int)hitBox.width,(int)hitBox.height);
    }
}
